package com.jk.mapper;

import com.jk.model.ProductBean;
import com.jk.model.UserBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.HashMap;
import java.util.List;

@Mapper
public interface UserMapper {

    @Select("select count(1) from t_user ")
    Integer getCount();
    /**
     * 根据商品id 查询商品详细内容
     * @return
     */
    @Select("SELECT tp.productId,tp.productName,tp.productImg,tp.productPrice,tp.productColor\n" +
            "FROM t_product tp WHERE tp.productId = 1")
    ProductBean queryProductInfoById(Integer id);
    /**
     * 分页审核商品 查询count
     * @return
     */
    int findShopProductCount(HashMap<String, Object> param);
    /**
     * 审核商品查询list
     * @return
     */
    List<UserBean> findShopProductList(HashMap<String, Object> param);
    /**
     * 审核商品的操作
     * @param falg
     * @return
     */
    void pizhun(@Param("id")Integer id, @Param("falg")Integer falg);
}
